<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>
            <?php
            @include 'titel.php';
            @include 'db.inc.php';
            @include 'pruef_login.inc.php';
            echo $titel;
            ?>
        </title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <link rel="stylesheet" href="css/style.css" type="text/css" />

            <script tpye="text/javascript" src="js/script.js"></script>
            <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
            <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
            <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>

            <script>
                $(function() {
                    $( "#datepicker" ).datepicker( $.datepicker.regional[ "de" ] ).datepicker('option', 'dateFormat' , 'yy-mm-dd');
                });

                $(function() {
                    $( "#datepicker_2" ).datepicker( $.datepicker.regional[ "de" ] ).datepicker('option', 'dateFormat' , 'yy-mm-dd');
                });
                
                $(function() {
                    $( "#datepicker_3" ).datepicker( $.datepicker.regional[ "de" ] ).datepicker('option', 'dateFormat' , 'yy-mm-dd');
                });
                
                $(function() {
                    $( "#datepicker_4" ).datepicker( $.datepicker.regional[ "de" ] ).datepicker('option', 'dateFormat' , 'yy-mm-dd');
                });
            </script>
    </head>
    <body>
        <div id="main">
            <div id="header">
                <h1>Neues Archiv aufnehmen</h1>
            </div>
            <?php
            @include 'navigation.inc.php';
            ?>
            <div id="contant_full">

                <?php
// Session starten oder übernehmen


                echo '<h2>Hier können Sie neues Archivmaterial erfassen.<br/></h2>';
                ?>

                <form action = "mysql_neu.php" method = "POST">
                    <table cellspacing="0" cellpadding="0" border="0" border-color="black">
                        <tr>
                            <td class="col-0"><lable for="Archivtyp">Archivtyp:</lable></td>
                            <td class="col-1" colspan=3>
                                <select name="Archivtyp" id="Archivtyp">
                                    <option value="Bitte auswählen!">Bitte auswählen!</option>
                                    <?php
                                    $ArchivTypName = mysql_query("SELECT TypName FROM Typ");
                                    $ArchivTypNr = mysql_query("SELECT TypNr FROM Typ");
                                    while ($row = mysql_fetch_object($ArchivTypName) and $row2 = mysql_fetch_object($ArchivTypNr)) {
                                        echo "<option value='" . $row2->TypNr . "'>" . $row->TypName . "</option>";
                                    }
                                    ?>
                                </select>  
                            </td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="ArchivNr">Archiv Nummer</lable></td>
                            <td class="col-1" colspan=3><input type="text" name="ArchivNr"  size="20" maxlength="11"/></td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="archivtext">Archivtext:</lable></td>
                            <td class="col-1" colspan="3" colspan=3><textarea name="archivtext" id="archivtext" maxlength="45" cols="100" rows="3" style="width: 430px; height: 50px;resize:none;"></textarea></td>                           
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="Standort">Standort:</lable></td>
                            <td class="col-1" colspan=3>
                                <select name="Standort" id="Standort">
                                    <option value="Bitte auswählen!">Bitte auswählen!</option>
                                    <?php
                                    $StandortName = mysql_query("SELECT StandortName FROM Standort");
                                    $StandortNr = mysql_query("SELECT StandortNr FROM Standort");
                                    while ($row = mysql_fetch_object($StandortName) and $row2 = mysql_fetch_object($StandortNr)) {
                                        echo "<option value='" . $row2->StandortNr . "'>" . $row->StandortName . "</option>";
                                    }
                                    ?>
                                </select> 
                            </td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="verfall">Datum Inhalt von:</lable></td>
                            <td class="col-1"><input type="text" id="datepicker" name="datum_von"  size="20" maxlength="40"/></td>
                            <td class="col-2"><lable for="sachbearbeiter">Datum Inhalt bis:</lable></td>
                            <td class="col-3"><input type="text" id="datepicker_2" name="datum_bis" size="20" maxlength="40"/></td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="Archivierung">Datum Archivierung:</lable></td>
                            <td class="col-1"><input type="text" name="Archivierung" id="datepicker_3" size="20" maxlength="40"/></td>
                            <td class="col-2"><lable for="Verfall">Datum Verfall:</lable></td>
                            <td class="col-3"><input type="text" name="Verfall" id="datepicker_4" size="20" maxlength="40"/></td>
                        </tr>

                        <tr>
                            <td class="col-0"><lable for="SolutionNr">Solution Nummer:</lable></td>
                            <td class="col-1"><input type="text" name="SolutionNr"  size="20" maxlength="12"/></td>
                            <td class="col-2"><lable for="AbacusNr">Abacus Nummer:</lable></td>
                            <td class="col-3"><input type="text" name="AbacusNr" size="20" maxlength="11"/></td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="Projektleiter">Projektleiter:</lable></td>
                            <td class="col-1" colspan="3"><input type="text" name="Projektleiter"  size="20" maxlength="4"/></td>
                        </tr>
                        <tr>
                            <td class="col-0"><lable for="Status">Status:</lable></td>
                            <td class="col-1" colspan="3">  
                                <?php
                                $StatusName = mysql_query("SELECT StatusName FROM status");
                                $StatusNr = mysql_query("SELECT StatusNr FROM status");
                                while ($row = mysql_fetch_object($StatusName) and $row2 = mysql_fetch_object($StatusNr)) {
                                    echo "<input type = 'radio' name = 'Status' value ='" . $row2->StatusNr . "'>&nbsp" . $row->StatusName . "</input>&nbsp&nbsp&nbsp&nbsp";
                                }
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <input type="submit" value="Daten aufnehmen!" />
                                <input type="reset" value="Clear" />  
                            </td>
                        </tr>
                    </table>
                    <br />
                    <br />
                </form>
            </div> 
            <br />
    </body>
</html>